package com.lin.springbootexceptionHandling.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler
    public String globalExceptionHandler(Exception e) {
        return "GlobalExceptionHandler 全局异常处理器: \r\n" + e.getMessage();
    }
}
